/* 搜索栏 */
var dYi=document.getElementsByClassName("head")[0];
var p=dYi.querySelectorAll("a");
//  console.log(dYi,p);
for(var i=0;i<p.length;i++){
    p[i].onclick=function(){
        for(var j=0;j<p.length;j++){
            p[j].classList.remove("dh");
        }
        this.classList.add("dh");
    }
}
/* fixed */
var fixed=document.getElementsByClassName("header")[0];
//   console.log(fixed);
  window.onscroll=function(){
      var st=document.documentElement.scrollTop||document.body.scrollTop;
      if(st>fixed.offsetHeight){
          fixed.style.position="fixed";
      }else{
          fixed.style.position="static";
      }
}

/* swiper */
var swiper = new Swiper(".huaDong", {
    slidesPerView: 4.5,
    spaceBetween: 5,
    freeMode: true,
  });